package com.sudo.service.admin.service;

import com.sudo.common.enums.SysUserSource;
import com.sudo.common.utils.PagedGridResult;
import com.sudo.dao.admin.entity.SysUser;
import com.sudo.dao.admin.model.bo.SysUserAddBO;
import com.sudo.dao.admin.model.bo.SysOnlineBO;
import com.sudo.dao.admin.model.bo.SysUserBasicInfoBO;
import com.sudo.dao.admin.model.bo.SysUserQueryBO;
import com.sudo.dao.admin.model.bo.sysconfig.SysRoleAutoConfigDTO;
import com.sudo.dao.admin.model.vo.SysSimpleUserVO;
import com.sudo.dao.admin.model.vo.SysUserReVO;

import java.util.List;

public interface SysUserService {

    SysUserReVO getSysUserAndRoleByUsername(String username);

    /**
     * 通过用户名查询用户基础信息
     */
    SysUser getSysUserWithoutPwdByUsername(String username);

    SysUser getSysUserWithoutPwdByMail(String mail);

    SysUser getSysUserByUsername(String username);

    /**
     * 通过注册邮箱查询用户基础信息
     */
    SysUser getSysUserByMail(String mail);

    PagedGridResult queryAllSysUserMainInfoByPage(SysUserQueryBO sysUserQueryBO);

    int addUser(SysUserAddBO sysUserAddBO);

    int updateSysUserRoleStatus(String username, String roleCode, String status);

    int deleteSysUserByUsername(String username);

    PagedGridResult getOnlineUserByPage(SysOnlineBO sysOnlineBO);

    int updateMyUserInfo(SysUserBasicInfoBO basicInfoBO);

    SysSimpleUserVO getMySimpleUserInfo(String username);

    int updateMyPassword(String sessionUser, String newPassword);

    int userRegister(String email, String username, String password, SysUserSource source, SysRoleAutoConfigDTO sysRoleAutoConfigDTO);

    List<SysUser> getAllUsername();
}
